9. 한번이라도 상품을 구매한 고객을 구하라. :: 오라클 실습[SSISO Community]
 
SSISO 카페 SSISO Source SSISO 구직 SSISO 쇼핑몰 SSISO 맛집
추천검색어 : JUnit   Log4j   ajax   spring   struts   struts-config.xml   Synchronized   책정보   Ajax 마스터하기   우측부분

오라클 실습
[1]
등록일:2009-05-28 00:21:02 (0%)
작성자:
제목:9. 한번이라도 상품을 구매한 고객을 구하라.
Select  distinct  a.cust_name,  b.br_name
From  customer  a,  branch  b,  sale  c
Where  a.br_no  =  b.br_no  and  a.cust_no  =  c.cust_no
And    c.saledate  like  ‘1995%’;

<개선안1>
select  a.cust_name,  b.br_name
from  customer  a,  branch  b
where  a.br_no  =  b.br_no
and  a.cust_no  in  (select  cust_no  
                                                          from  sale
                                                          where  saledate  like  ‘1995%’);  

<개선안2>
select  a.cust_name,  br_name
from  customer  a,  branch  b
where  exits  (select  ‘x’  
                                            from  sale  c  
                                        where  a.cust_no  =  c.c  
[본문링크] 9. 한번이라도 상품을 구매한 고객을 구하라.
[1]
코멘트(이글의 트랙백 주소:/cafe/tb_receive.php?no=31515
작성자
비밀번호

 

SSISOCommunity

[이전]

Copyright byCopyright ⓒ2005, SSISO Community All Rights Reserved.